﻿

namespace Mulala.Cavan.Domain.MainBoundedContext.SearchModule
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using Mulala.Cavan.Domain.MainBoundedContext.NannyModule;
    using Mulala.Cavan.Domain.MainBoundedContext.ConsignModule;

    public static class ConsignSearchFactory
    {
        public static ConsignSearch CreateConsignSearch(int proprietorID, IDictionary<string, bool> orderBy, int currentPage, int maxRowsPerPage)
        {
            ConsignSearch search = new ConsignSearch();
            search.ProprietorID = proprietorID;
            search.OrderBy = orderBy;
            search.CurrentPage = currentPage;
            search.MaxRowsPerPage = maxRowsPerPage;

            return search;
        }

        public static ConsignSearch CreateConsignSearch(NannyIdentifier.NannyType? type, int experience, string areaCode,
            int age, int salary, int degree, int[] skillPosition, IDictionary<string, bool> orderBy, int currentPage, int maxRowsPerPage)
        {
            ConsignSearch search = new ConsignSearch();
            search.Type = type;
            search.Experience = experience;
            search.AreaCode = areaCode;
            search.Age = age;
            search.Salary = salary;
            search.Degree = degree;
            search.SkillPosition = skillPosition;
            search.OrderBy = orderBy;
            search.CurrentPage = currentPage;
            search.MaxRowsPerPage = maxRowsPerPage;

            return search;
        }

        public static ConsignSearch CreateConsignSearch(NannyIdentifier.NannyType type, int experience, string areaCode, int[] skillPosition, 
                                        IDictionary<string, bool> orderBy, int currentPage, int maxRowsPerPage)
        {
            ConsignSearch search = new ConsignSearch();
            search.Type = type;
            search.Experience = experience;
            search.AreaCode = areaCode;
            search.SkillPosition = skillPosition;
            search.OrderBy = orderBy;
            search.CurrentPage = currentPage;
            search.MaxRowsPerPage = maxRowsPerPage;

            return search;
        }

        public static ConsignSearch CreateConsignSearch(bool? isSystemRecommend, IDictionary<string, bool> orderBy, int currentPage, int maxRowsPerPage)
        {
            ConsignSearch search = new ConsignSearch();
            search.IsSystemRecommed = isSystemRecommend;
            search.OrderBy = orderBy;
            search.CurrentPage = currentPage;
            search.MaxRowsPerPage = maxRowsPerPage;

            return search;
        }

        public static ConsignSearch CreateConsignSearch(ConsignIdentifier.ConsignStatus consignStatus, IDictionary<string, bool> orderBy, int currentPage, int maxRowsPerPage)
        {
            ConsignSearch search = new ConsignSearch();
            search.ConsignStatus = consignStatus;
            search.OrderBy = orderBy;
            search.CurrentPage = currentPage;
            search.MaxRowsPerPage = maxRowsPerPage;

            return search;
        }

        public static ConsignSearch CreateConsignSearch(int proprietorID, ConsignIdentifier.ConsignStatus consignStatus, IDictionary<string, bool> orderBy, int currentPage, int maxRowsPerPage)
        {
            ConsignSearch search = new ConsignSearch();
            search.ProprietorID = proprietorID;
            search.ConsignStatus = consignStatus;
            search.OrderBy = orderBy;
            search.CurrentPage = currentPage;
            search.MaxRowsPerPage = maxRowsPerPage;

            return search;
        }

        public static ConsignSearch CreateConsignSearch(int proprietorID)
        {
            ConsignSearch search = new ConsignSearch();
            search.ProprietorID = proprietorID;

            return search;
        }
    }
}
